/**
 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.bar.model;

import java.io.Serializable;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * This class is used by SOAP remote services, specifically {@link com.bar.service.http.MailingServiceSoap}.
 *
 * @author    pgonzalm
 * @see       com.bar.service.http.MailingServiceSoap
 * @generated
 */
public class MailingSoap implements Serializable {
	public static MailingSoap toSoapModel(Mailing model) {
		MailingSoap soapModel = new MailingSoap();

		soapModel.setMailingId(model.getMailingId());
		soapModel.setUserName(model.getUserName());
		soapModel.setCreateDate(model.getCreateDate());
		soapModel.setUserSurname(model.getUserSurname());
		soapModel.setMailing(model.getMailing());
		soapModel.setEmail(model.getEmail());
		soapModel.setPhone(model.getPhone());

		return soapModel;
	}

	public static MailingSoap[] toSoapModels(Mailing[] models) {
		MailingSoap[] soapModels = new MailingSoap[models.length];

		for (int i = 0; i < models.length; i++) {
			soapModels[i] = toSoapModel(models[i]);
		}

		return soapModels;
	}

	public static MailingSoap[][] toSoapModels(Mailing[][] models) {
		MailingSoap[][] soapModels = null;

		if (models.length > 0) {
			soapModels = new MailingSoap[models.length][models[0].length];
		}
		else {
			soapModels = new MailingSoap[0][0];
		}

		for (int i = 0; i < models.length; i++) {
			soapModels[i] = toSoapModels(models[i]);
		}

		return soapModels;
	}

	public static MailingSoap[] toSoapModels(List<Mailing> models) {
		List<MailingSoap> soapModels = new ArrayList<MailingSoap>(models.size());

		for (Mailing model : models) {
			soapModels.add(toSoapModel(model));
		}

		return soapModels.toArray(new MailingSoap[soapModels.size()]);
	}

	public MailingSoap() {
	}

	public long getPrimaryKey() {
		return _mailingId;
	}

	public void setPrimaryKey(long pk) {
		setMailingId(pk);
	}

	public long getMailingId() {
		return _mailingId;
	}

	public void setMailingId(long mailingId) {
		_mailingId = mailingId;
	}

	public String getUserName() {
		return _userName;
	}

	public void setUserName(String userName) {
		_userName = userName;
	}

	public Date getCreateDate() {
		return _createDate;
	}

	public void setCreateDate(Date createDate) {
		_createDate = createDate;
	}

	public String getUserSurname() {
		return _userSurname;
	}

	public void setUserSurname(String userSurname) {
		_userSurname = userSurname;
	}

	public boolean getMailing() {
		return _mailing;
	}

	public boolean isMailing() {
		return _mailing;
	}

	public void setMailing(boolean mailing) {
		_mailing = mailing;
	}

	public String getEmail() {
		return _email;
	}

	public void setEmail(String email) {
		_email = email;
	}

	public long getPhone() {
		return _phone;
	}

	public void setPhone(long phone) {
		_phone = phone;
	}

	private long _mailingId;
	private String _userName;
	private Date _createDate;
	private String _userSurname;
	private boolean _mailing;
	private String _email;
	private long _phone;
}